package cn.itcast.bos.web.action.taketime;

import java.util.List;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;

import com.opensymphony.xwork2.ActionContext;

import cn.itcast.bos.domain.base.TakeTime;
import cn.itcast.bos.service.taketime.TakeTimeService;
import cn.itcast.bos.web.action.base.BaseAction;
@Namespace("/")
@ParentPackage("json-default")
@Controller
@Scope("prototype")
public class TakeTimeAction extends BaseAction<TakeTime>{
   @Autowired
   private TakeTimeService takeTimeService;
   
   //关联客户时的查询
   @Action(value="taketime_findName", results={@Result(name="success",type="json")})
   public String findAll(){
	  List<TakeTime>list= takeTimeService.findAll();
	ActionContext.getContext().getValueStack().push(list);
	   return SUCCESS;
   }
}
